﻿<UserControl x:Class="ELTester.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009"
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
    xmlns:eagl="clr-namespace:Eaglight;assembly=libEL"
    xmlns:eaglb="clr-namespace:Eaglight.Behaviors;assembly=libEL"
    xmlns:eagla="clr-namespace:Eaglight.Actions;assembly=libEL"
    xmlns:lc="clr-namespace:LightControls;assembly=LightControls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <Grid x:Name="LayoutRoot" Background="White">
    	<Grid.RowDefinitions>
    		<RowDefinition Height="Auto"/>
    		<RowDefinition Height="*"/>
    	</Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="250"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <esri:Map x:Name="MyMap" Grid.Row="1" Grid.Column="1">
            <esri:ArcGISDynamicMapServiceLayer ID="MyLayer" Url="http://maverick.arcgis.com/ArcGIS/rest/services/World_WGS84/MapServer" />
            <esri:GraphicsLayer x:Name="MyGraphicsLayer"/>
        </esri:Map>

        <eagl:IdentifyResultsPanel x:Name="pnlIdentifyResults" Grid.Column="1" Grid.Row="1" Visibility="Collapsed" Background="AliceBlue" BorderBrush="SteelBlue" BorderThickness="1" 
                                   VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="10"/>
        
        <StackPanel Grid.Row="0" Grid.ColumnSpan="2" Orientation="Horizontal">
            <eagl:MappingToolbar x:Name="tbMapping" Map="{Binding ElementName=MyMap}" ShowToolTips="True"
                        IdentifyResultsPanel="{Binding ElementName=pnlIdentifyResults}" AutoIdentify="True"
                        IdentifyLayerOptions="all" IdentifyLayerId="MyLayer" Margin="3,0"/>
            <eagl:MeasureToolbar Map="{Binding ElementName=MyMap}" Margin="3,0"/>
        </StackPanel>

    </Grid>
</UserControl>
